﻿#ifndef ELEMENTSREADER_H
#define ELEMENTSREADER_H
#include<QString>
#include "ElementTreeModel.h"
class ElementTreeItem;

class ElementsReader:public ElementTreeModel::TreeModeReader
{
    using ull=unsigned long long;

public:
    enum FileType{
        Psmodel,
        CSV,
        XLS,
        XLSX
    };
    ElementsReader();
    ElementTreeItem* read(const QString& filePath) const override;
private:
    ElementTreeItem* readCSV(const QString& filePath,const QString& sep,bool isPSMosel) const;
    ElementTreeItem* readExecl(const QString& filePath,FileType type=XLSX) const;
    const static QRegularExpression mRegExpText;
    const static QRegularExpression mRegExpCSV;
};
#endif // ELEMENTSREADER_H
